package com.dtb.trade.controller;

import com.dtb.trade.dao.mongodb.first.FirstRepository;
import com.dtb.trade.dao.mongodb.fourth.FourthRepository;
import com.dtb.trade.dao.mongodb.second.SecondRepository;
import com.dtb.trade.dao.mongodb.third.ThirdRepository;
import com.dtb.trade.entity.mongodb.first.FirstBlock;
import com.dtb.trade.entity.mongodb.fourth.FourthBlock;
import com.dtb.trade.entity.mongodb.second.SecondBlock;
import com.dtb.trade.entity.mongodb.third.ThirdBlock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author:ChengJian
 * @Description:
 * @Date: Created in 下午4:19 2018/8/16
 */
@Controller
public class TestController {


        @Autowired
        FirstRepository firstRepository;

        @Autowired
        SecondRepository secondRepository;

        @Autowired
        ThirdRepository thirdRepository;

        @Autowired
        FourthRepository fourthRepository;

        @GetMapping(value = "/test1")
        @ResponseBody
        public void test1(){
            firstRepository.save(new FirstBlock(4,"3782wdsiuewfhfed",47843984,null,"",1,"313"));
        }

        @GetMapping(value = "/test2")
        @ResponseBody
        public void test2(){
            secondRepository.save(new SecondBlock(122,"3782wdsiuewfhfed",47843984,null,"",1,"313"));
        }


        @GetMapping(value = "/test3")
        public void test3(){
            thirdRepository.save(new ThirdBlock(1,"3782wdsiuewfhfed",47843984,null,"",1,"313"));
        }

        @GetMapping(value = "/test4")
        public void test4(){
            fourthRepository.save(new FourthBlock(1,"3782wdsiuewfhfed",47843984,null,"",1,"313"));
        }


        public void test5(){

        }


}
